﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Register</title>
     <script src="<%= Url.Content("~/Scripts/MicrosoftAjax.debug.js") %>" type="text/javascript"></script>  
    <script src="<%= Url.Content("~/Scripts/MicrosoftMvcAjax.debug.js") %>" type="text/javascript"></script>   
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
    <script src="/Scripts/vgo_01.js"></script>
    <link rel="Stylesheet" href="/Content/Style/layoutAll.css" />
</head>
<body>
    <div>
        <center>
            <br />
            <h2>Đăng ký thành viên</h2>
            <form method="post" action="/Register" onsubmit="return ValidUserRegister()">
            <table>
                <tr>
                    <td><span>Họ tên:</span></td>
                    <td>
                        <input type="text" name="FullName" id="FullName"/>
                        <img src="" id="img_fullName" class="img_alert" />
                        <span id="lbFullNameErrMsg" class="lbErrr"></span>
                    </td>
                </tr>
                <tr>
                    <td><span>Tên đăng nhập</span></td>
                    <td>
                        <input type="text" id="UserName" name="UserName" />
                         <img src="" id="img_userNameMsg" class="img_alert" />
                        <span class="lbErrr" id="lbUserErrMsg"></span>
                    </td>
                </tr>
                <tr>
                    <td><span>Mật khẩu</span></td>
                    <td>
                        <input type="password" name="PassWord" id="PassWord" />
                        <img src="" id="img_passMsg" class="img_alert" />
                        <span class="lbErrr" id="lbPasswordErrMsg"></span>
                    </td>
                </tr>
                <tr>
                    <td><span>Xác nhận mật khẩu</span></td>
                    <td>
                        <input type="password" name="ConfirmPassWord" id="ConfirmPassWord"/>
                         <img src="" id="img_confirmPassMsg" class="img_alert" />
                         <span class="lbErrr" id="lbConfirmPassErrMsg"></span>
                    </td>
                </tr>
                <tr>
                    <td><span>Email</span></td>
                    <td>
                        <input type="text" name="Email" id="Email" />
                        <img src="" id="img_emailMsg" class="img_alert" />
                        <span class="lbErrr" id="lbEmailErrMsg"></span>
                    </td>
                </tr>
                <tr>
                    <td>Giới tính</td>
                    <td>
                        <select name="Gender">
                               <option>Nam</option>
                               <option>Nữ</option>
                        </select>
                   </td>
                </tr>
                <!--- IDentity card --->
                    <tr>
                        <td><span>CMND</span></td>
                        <td><input type="text" name="IdentifyNumber" id="IdentifyNumber" /></td>
                    </tr>
                    <tr class="IDHidden">
                        <td><span>Ngày cấp</span></td>
                        <td> 
                        <table width="100%">
                            <tr>
                                <td> 
                                    <select name="issueDate" id="issueDate">
                                    <option id="NgayCap">Ngày</option>
                                    <% for (int l = 1; l <= 31; l++)
                                       { 
                                    %>
                                        <% if (l < 10)
                                           { %>
                                        <option id="0<%: l%>_cmt">0<%: l%></option>  
                                        <%}
                                           else
                                           { %>
                                        <option id="<%: l %>_cmt"><%: l%></option>  
                                    <% }
                                       } %>
                                </select>/
                                <select name="issueMonth" id="issueMonth">
                                        <option id="ThangCap">Tháng</option>
                                    <% for (int m = 1; m <= 12; m++)
                                       { 
                                    %>
                                        <% if (m < 10)
                                           { %>
                                        <option id="0<%: m%>_cmt">0<%: m%></option>  
                                        <%}
                                           else
                                           {%>
                                        <option id="<%: m %>_cmt"><%: m%></option>  
                                    <% }
                                       } %>
                                </select>/
                                <select name="issueYear" id="issueYear">
                                        <option id="NamCap">Năm</option>
                                    <% for (int t = 1940; t <= int.Parse(DateTime.Now.Year.ToString()); t++)
                                        { 
                                    %> 
                                        <option id="<%: t%>_cmt"><%: t%></option>  
                                    <% } %>
                                </select>
                                </td>
                            </tr>   
                        </table>
                      </td>
                    </tr>
                    <tr class="IDHidden">
                        <td><span>Nơi cấp</span></td>
                        <td>
                            <% if (ViewData["lstPlaceIsuse"] != null)
                               { %>
                                <%: Html.DropDownList("lstPlaceIsuse", "---Chọn tỉnh---")%>
                            <%} %>
                        </td>
                    </tr>
                <!--- end IDentity card --->

                <!--- Address --->
                <tr>
                    <td><span>Địa chỉ</span></td>
                    <td>
                        <input type="text" name="Address" id="Address" PlaceHolder="Phường/Xã - Quận/Huyện" /> &nbsp;
                         <% if (ViewData["lstAddress"] != null)
                           { %>
                            <%: Html.DropDownList("lstAddress", "---Tỉnh / Thành phố---")%>
                        <%} %>
                    </td>
                </tr>
                <!---Address --->
                <tr>
                    <td><span>Quê quán</span></td>
                    <td>
                        <input type="text" name="HomeTown" id="HomeTown" PlaceHolder="Phường/Xã - Quận/Huyện" /> &nbsp;  
                        <% if (ViewData["lstHomeTown"] != null)
                           { %>
                            <%: Html.DropDownList("lstHomeTown", "---Tỉnh / Thành phố---")%>
                        <%} %>
                        <img src="" id="img_homeTownMsg" class="img_alert" />
                        <span class="lbErrr" id="lbHomeTownErrMsg"></span>
                    </td>
                </tr>
                 <tr>
                    <td><span>Ngày Sinh</span></td>
                    <td>
                        <select name="dateOfBirth" id="dateOfBirth">
                            <option id="ChonNgay">Ngày</option>
                            <% for (int i = 1; i <= 31; i++)
                               { 
                            %>
                                <% if (i < 10)
                                   { %>
                               <option id="0<%: i %>">0<%: i%></option>  
                               <%}
                                   else
                                   {%>
                               <option id="<%: i %>"><%: i%></option>  
                            <% }
                               }%>
                        </select>/
                        <select name="monthOfBirth" id="monthOfBirth">
                             <option id="chonThang">Tháng</option>
                            <% for (int j = 1; j <= 12; j++)
                               { 
                            %>
                            <% if (j < 10)
                               { %>
                               <option id="0<%: j %>">0<%: j%></option>  
                               <%}
                               else
                               {%>
                                <option id="<%: j %>"><%: j%></option>  
                            <% }
                               } %>
                        </select>/
                        <select name="yearOfBirth" id="yearOfBirth">
                              <option id="chonNam">Năm</option>
                            <% for (int k = 1940; k <= int.Parse(DateTime.Now.Year.ToString()); k++)
                               { 
                            %> 
                               <option id="<%:k %>"><%: k%></option>  
                            <% } %>
                        </select>
                         <img src="" id="img_birthDayMsg" class="img_alert" />
                         <span class="lbErrr" id="lbBirthDateErrMsg"></span>
                    </td>
                </tr>
                 <tr>
                    <td><span>Số điện thoại</span></td>
                    <td>
                        <input type="text" name="PhoneNumber" id="PhoneNumber" />

                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                       <% if (ViewData["ImageUrl"] != null)
                        { %>
                           <% string imageUrl = ViewData["ImageUrl"].ToString(); %>
                           <input type="hidden" id="imageChangeUrl" name="imgSrc" />
                           <img src="<%: imageUrl %>" id="img_captCha" />
                      <%} %>
                      <%: Ajax.ActionLink(" ", "CreateCaptcha", new { id = "ReloadCaptcha" }, new AjaxOptions { UpdateTargetId = "imageChangeUrl", OnSuccess = "AjaxComplete" }, new { @Class = "refesh" })%>
                    </td>
                </tr>
                <tr>
                    <td>Mã bảo mật</td>
                    <td>
                        <input type="text" name="captcha" id="txt_captcha" />
                        <img src="" id="img_captchaMsg" class="img_alert"/>
                        <span class="lbErrr" id="lbCaptcharErrMsg"></span>
                    </td>
                </tr>
                 <%--
                    <td>
                      <link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
                      <script src="//code.jquery.com/jquery-1.10.2.js"></script>
                      <script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
                      <link rel="stylesheet" href="/resources/demos/style.css">
                      <script>
                          $(function () {
                              $("#datepicker").datepicker({
                                  changeMonth: true,
                                  changeYear: true
                              });
                          });
                      </script>
                    <p>Date: <input type="text" id="datepicker"></p>
                    </td>--%>

                    <td></td>
                    <td>
                        <input type="submit" value="Đăng ký" name="btnRegister" id="btnRegister" />
                        <input type="button" value="test" name="btnReset" id="btnReset" />
                    </td>
                </tr>
            </table>
            <br />
             <span id="ErrMsg"></span>
            </form>
         </center>   
    </div>
</body>
</html>
